<?php
    require_once(dirname(dirname(dirname(__FILE__))) . '/core.php');
    // include dirname(BASE_PATH) . '/wap/e_tpl/tmpl/member.html';
    // exit;
    $minfo = get_mobile_member_info();

    if (!$minfo) {
        header("location:/wap/tmpl/member/login.php");
        exit;
    }

    include dirname(BASE_PATH) . '/wap/e_tpl/tmpl/member/member.php';
    exit;

?><!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的商城</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
<meta name="format-detection" content="telephone=no" />
<meta name="full-screen" content="yes"/>
<meta name="browsermode" content="application"/>
<!-- QQ强制竖屏 QQ强制全屏 -->
<meta name="x5-orientation" content="portrait"/>
<meta name="x5-fullscreen" content="true"/>
<meta name="x5-page-mode" content="app"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" type="text/css" href="../../css/reset.css">
    <link rel="stylesheet" type="text/css" href="../../css/main.css">
	<link rel="stylesheet" type="text/css" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/member.css">
    <link rel="stylesheet" type="text/css" href="/wap/css/phone.css"/>
</head>
<body class="member-body">
    <style>
        .mc-cnt {
            overflow: hidden;
        }
        .mc-cnt li{
            float: left;
            display: block;
            width: 24.9%;
            text-align: center;
            border-top: 1px solid #ddd;
            border-left: 1px solid #ddd;
            box-sizing : border-box;
            padding-top: 0.5em;
            padding-bottom: 0.2em;
        }
        .mc-cnt li i{
            font-size: 3em;
            display: block;
            height: 1em;
        }
        .mc-cnt li b{
            display: block;
            font-size: 0.8em;
            padding-top: 0.5em;
            font-weight: normal;
            padding-bottom: 0.5em;

        }
        .grayrightarrow{
            display: none;
        }
    </style>
    <header id="header"></header>
    <div class="m-top clearfix">
        <div class="m-avatar fleft">
            <img src="" id="avatar"/>
        </div>
        <div class="m-infor fleft">
            <div class="m-name mt10">
               	 昵称：<span id="username"></span>
            </div>
            <div class="clearfix mt10">
                <span class="m-jifen">
                    <span>积分</span>
                    <span class="clr-d94" id="point"></span>
                </span>
                 <span class="m-yue">
                      <span>预存款</span>
                      <span class="clr-d94" id="predepoit"></span>
                 </span>
            </div>
        </div>
    </div>
    <div class="m-center">
        <ul class="mc-cnt">
            <li style='border-bottom: 0;'>
                <a href="order_list.html">
                    <i class="fa fa-file-text" style="color: #F93;"></i>
                    <b>我的订单</b>
                    <span class="grayrightarrow"></span>
                </a>
            </li>

            <li style='border-bottom: 0;'>
                <a href="voucher_list.html">
                    <i class="fa fa-money" style='color: #f9c73a;'></i>
                    <b>代金券</b>
                    <span class="grayrightarrow"></span>
                </a>
            </li>
            <li >
                <a href="favorites.html">
                     <i class="fa fa-heart-o" style="color: pink;"></i>
                    <b>我的收藏</b>
                     <span class="grayrightarrow"></span>
                </a>
            </li>
            <li style='border-right:1px solid #ddd;'>
                <a href="address_list.html">
                    <i class="fa fa-map-marker" style='color: #f26c5f;'></i>
                    <b>地址管理</b>
                    <span class="grayrightarrow"></span>
                </a>
            </li>
            <li>
                <a href="views_list.html">
                    <i class="fa fa-clock-o" style='color: #f9c73a;'></i>
                    <b>我的足迹</b>
                     <span class="grayrightarrow"></span>
                </a>
            </li>
            <li style='border-right: 1px solid #ddd;'>
                <a href="profile.php">
                    <i class="fa fa-user" style='color: #f26c5f;'></i>
                    <b>个人信息</b>
                </a>
            </li>



        </ul>
    </div>

    <?php


        exit;
    if(dis_open()){
        $proxy = Model('proxy')->where(array('member_id' => $minfo['member_id']))->find();
        //如果是分销商
        if ($proxy['is_buyer'] == 0) {


    ?>
        <a href="distribute_center.php" class="distribute_center">
            分销中心
        </a>

    <?php
        }
        else{
    ?>
            <a href="">申请成为分销商</a>
    <?php
        }


    }
    ?>

    <div class="footer" id="footer"></div>
    <?php

        //require_once(dirname(dirname(dirname(__FILE__))) . '/wechat_core.php');
    ?>

    <script type="text/javascript" src="../../js/config.js"></script>
    <script type="text/javascript" src="../../js/zepto.min.js"></script>
    <script type="text/javascript" src="../../js/template.js"></script>
    <script type="text/javascript" src="../../js/common.js"></script>
    <script type="text/javascript" src="../../js/tmpl/common-top.js"></script>
    <script type="text/javascript" src="../../js/tmpl/member.js"></script>
    <!-- <script>alert(2)</script> -->
    <script type="text/javascript" src="../../js/tmpl/footer.js"></script>

    <style>
        .footer-top{
            position: fixed;
            bottom: 50px;
            width : 100%;
            padding: 0;
            margin: 0;
        }
    </style>
    <script>


        <?php if (strpos($user_agent, 'MicroMessenger') === false) { ?>
        var show_this = true;
            $(function(){
            var memberHtml = '<a class="btn mr5" href="'+WapSiteUrl+'/tmpl/member/member.php?act=member">个人中心</a><a class="btn mr5" href="'+WapSiteUrl+'//tmpl/member/register.html">注册</a>';
            var act = GetQueryString("act");
            if(act && act == "member"){
                memberHtml = '<a class="btn mr5" id="logoutbtn" href="javascript:void(0);">注销账号</a>';
            }
            var tmpl = '<div class="footer">'
                +'<div class="footer-top">'
                    +'<div class="footer-tleft">'+ memberHtml +'</div>'
                    +'<a href="javascript:void(0);"class="gotop">'
                        +'<span class="gotop-icon"></span>'
                        +'<p>回顶部</p>'
                    +'</a>'
                +'</div>'

            +'</div>';

            var html = template.compile(tmpl);
            $('#footer').append(html.call());
        })

        <?php }?>
    </script>
</body>
</html>